﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tracy.Messages;
using SharedLib.Helpers;

namespace Tracy.Handlers
{
    public class CopyFileHandler : TaskMessageHandler<CopyFileMessage>
    {
        protected override void ProcessMessage(CopyFileMessage msg)
        {
            if(msg.Mode == CopyFileMessage.CopyFileMode.Copy)
                IOHelper.CopyFile(msg.SourceFile, msg.DestinationFile);
            else
                IOHelper.MoveFile(msg.SourceFile, msg.DestinationFile);
        }
    }
}
